<?php
/**
 * 合作伙伴 - 管理后台
 *
 * @author birdy <freebirdy@foxmail.com>
 * @link http://www.aiyuangong.com
 */

namespace app\admin\controller\type;

use app\admin\controller\system\Item;

class SpecialTopic extends Item
{
    protected $tag = 'special_topic';
    
    //层级
    protected $level = 1;
    
    //字段名称
    protected $title = ['name' => '标题', 'tag' => '副标题', 'remark' => '备注'];
    
    //列表字段
    protected $row  = ['id', 'name', 'tag', 'fields'=>['image']];
    
     //列表显示的按钮
    //例：[['name'=>'编辑', 'url'=>'edit', 'type'=>'layer_open', 'icon' => '&#xe6df;']]
    protected $extend_list_btns = [['name'=>'专题链接', 'url'=>'check', 'type'=>'layer_open', 'icon' => '专题链接']];
    
    /**
     * 查看专题链接
     * **/
    public function check (){
        $id = $this->request->param('id/d',0);
        $link = url('index/topic/index',['id'=>$id],true,true);
        $this->view->assign('link',$link);
        return $this->view->fetch();
    }
}